package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 销售订单明细实体类
 */
@Data
@NoArgsConstructor
@TableName("t_saleorderinfo")
public class SaleOrderInfoBean {
    @TableId(value = "pk_saleOrderInfoId",type = IdType.AUTO)
    private Integer id;

    @TableField("fk_saleOrderId")
    private Integer saleOrderId;

    @TableField(exist = false)
    private SaleOrderBean saleOrder;

    @TableField("fk_productId")
    private Integer productId;

    @TableField(exist = false)
    private ProductBean product;

    @TableField("soi_price")
    private Integer price;

    @TableField("soi_num")
    private Integer num;

    public SaleOrderInfoBean(Integer saleOrderId, Integer productId, Integer price, Integer num) {
        this.saleOrderId = saleOrderId;
        this.productId = productId;
        this.price = price;
        this.num = num;
    }
}
